home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games Extra 1996 September
/
Amiga Games Extra CD-ROM 9-1996.iso
/
rexx
/
browser.vinci
< prev
next >
Wrap
Text File
|
1996-02-05
|
1KB
|
54 lines
/*
* Dir browser. ARexx script for Vinci.
*
* Copyright © 1995-1996 Martin Wulffeld.
*
* Thanks to Preben Nielsen for help with the random function.
*
* This script first requests a path from the user then creates a list of all
* files in the directory including sub-directories and shows it as an
* AmigaGuide document in Vinci.
*/
options results
address 'VINCI'
CALL RANDOM(1,1000,TIME('S')) /* Randomize initially using timer */
tempfilename = 'T:Vinci.'result
GetPath
if rc = 0 then
do
address command 'List FILES ALL 'result' TO T:Dir.temp LFORMAT "%F%N"'
if rc = 0 then
address command 'Sort FROM T:Dir.temp TO T:Dir.sorted'
if rc = 0 then
if open( 'browsefile', tempfilename, 'w' ) then
do
call writeln( 'browsefile', '@DATABASE "'result'"' )
call writeln( 'browsefile', '@NODE Main "Vinci Browser"' )
call writeln( 'browsefile', '' )
if open( 'dirfile', 'T:Dir.sorted', 'r' ) then
do
do forever
str = readln( 'dirfile' )
if str = '' then break
call writeln( 'browsefile', '@{ "'str'" LINK "'str'/MAIN"}' )
end
call close( 'dirfile' )
end
call writeln( 'browsefile', '@ENDNODE' )
call close( 'browsefile' )
end
Loadfile F tempfilename M 2
end